<?php
/**
 * Created by PhpStorm.
 * User: linux
 * Date: 23/01/2018
 * Time: 11:05 PM
 */

namespace DecoratorPattern\Shape;


class RedCircleShape extends ShapeDecorator
{
    public function __construct(Shape $shape)
    {
        parent::__construct($shape);
    }

    public function draw()
    {
        // 添加了新功能
        $this->addColor();
        parent::draw();
    }

    private function  addColor()
    {
        echo "添加颜色:红色\r\n";
    }


}